<?php if($categories):?><select id="ProductCategoryId" size="10" name="data[Product][category_id]" class="multiple-select"><option value="0" disabled="disabled">-----Select Category-----</option><?php	foreach ($categories as $category):	$selected="";	if($this->data['selected_id']>0){			if($this->data['selected_id']==$category['Category']['id'])			$selected=" selected='selected'";		else			$selected="";	}	?><option value="<?php echo $category['Category']['id']?>" <?php echo $selected;?>><?php echo $category['Category']['category_name']?></option><?php endforeach;?></select><?php else:?><span class="error_text">No Sub Category found.</span><?php endif;?>